home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 441 / vdisrc12 / vdimacro.s < prev    next >
Text File  |  1990-11-23  |  1KB  |  51 lines

  1.  
  2. ;*========================================================================
  3. ;*
  4. ;* VDIFAST Public Domain VDI bindings.
  5. ;*
  6. ;*========================================================================
  7.  
  8.           .extern   vdicall   ; Let everyone see this routine's name.
  9.           
  10. ;*************************************************************************
  11. ;*
  12. ;* VContrl macro.
  13. ;*  Setup the 'contrl' parm block.
  14. ;*  'opcode' is mandatory.  
  15. ;*  Subfunction and intin/ptsin counts are optional, and will be zeroed
  16. ;*  if they are not specified.
  17. ;*
  18. ;*************************************************************************
  19.  
  20. .macro    VContrl   opc,sub,pti,ini,hnd
  21.  
  22.           .if       \?hnd
  23.           move.w    \hnd,-(sp)
  24.           .else
  25.           move.w    .handle(a6),-(sp)
  26.           .endif
  27.           
  28.           .if       \?sub
  29.           move.w    \sub,-(sp)
  30.           subq.w    #2,sp
  31.           .else
  32.           clr.l     -(sp)
  33.           .endif
  34.           
  35.           .if       \?ini
  36.           move.w    \ini,-(sp)
  37.           subq.w    #2,sp
  38.           .else
  39.           clr.l     -(sp)
  40.           .endif
  41.           
  42.           .if       \?pti    
  43.           move.w    \pti,-(sp)
  44.           .else
  45.           clr.w     -(sp)
  46.           .endif
  47.           
  48.           move.w    \opc,-(sp)
  49. .endm
  50.  
  51.